﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Calc1Contract;
using CalcHostView;
using System.AddIn;
using System.AddIn.Contract;
using System.AddIn.Pipeline;

namespace CalcHostSideAdapter
{
    [HostAdapter]
    public class  CalculatorContractToViewAdapter:ICalculator 
    {
        private ICalcContract _calcContract;
        private ContractHandle _handle;

        public CalculatorContractToViewAdapter(ICalcContract calcContract)
        {
            _calcContract = calcContract;
            _handle = new ContractHandle(calcContract);
        }


        #region ICalculator Members

        public double Add(double x, double y)
        {
            return _calcContract.Add(x, y);     
        }

        public double Substract(double x, double y)
        {
            return _calcContract.Substract(x, y);
        }

        public double Mitiply(double x, double y)
        {
            return _calcContract.Mitiply(x, y);
        }

        public double Divide(double x, double y)
        {
            return _calcContract.Divide(x, y);
        }

        #endregion
    }
}
